This invention relates to a method for enhancing image data by sharpening. More particularly, this invention relates to a method for enhancing by sharpening raw image data, such as a JPEG decompressed image data.
Image data file compression can be divided into two types, xe2x80x9cnon-lossyxe2x80x9d and xe2x80x9clossyxe2x80x9d. A xe2x80x9cnon-lossyxe2x80x9d compression method implies that there is no loss of image quality. This method however does not afford much decrease in image data size. In a xe2x80x9clossyxe2x80x9d method, data is shed resulting in a smaller image data size at the expense of image quality. One such compression method is the JPEG compression standard. JPEG is developed by the Joint Photographic Experts Group and hence the abbreviation.
In JPEG compression, the amount of compression applied to an image data or image file can be varied. The amount of compression determines the quality of the compressed image. A compression index of 1:4 results in an image of reasonably good quality and a compression index of 1:28 results in an image of rather poor quality. A reproduction of an image compressed with a compression index of 1:28 will contain compression artifacts. These artifacts are unnatural elements or distortions in the reproduction of the compressed image. The reproduced image tends to contain blocky image artifacts. JPEG compression is also likely to produce mushy areas that lack sharpness, especially obvious in the flat areas of an image, overemphasized edges and unnatural color distribution in the image.
The amount of memory available in consumer products such as digital cameras, photo scanners and digital recorders for capturing JPEG images is usually limited by cost. Images captured on such products are usually JPEG compressed to a resolution of 640xc3x97480 pixels. On reproduction of such an image on a printer, smoothing of the image inevitably occurs. Smoothing effectively blurs an image, resulting in an image of reduced quality. Smoothing can occur at different stages in a reproduction process. One such stage is during the scaling of an image. Scaling occurs when a 640xc3x97680 pixel image is printed to a size of 5xc3x973.5 inches on a 300 dot-per-inch (dpi) printer. The original image needs to be scaled to an image of a resolution of 1500xc3x971050 pixels. This scaling effectively smoothes the image. In inkjet printers where a halftoning process is used to enable the inkjet printer to print many different colors based on a limited number of available inks, extensive smoothing further occurs. In an attempt by using low-pass filtering to reduce artifacts that result from JPEG compression, further smoothing of real objects in an image also occurs. As far as compression artifacts are concerned, smoothing is advantageous in reducing artifacts.
To enhance the quality of smoothed images, a sharpening step or process is performed on the smoothed images. Currently available sharpening processes, such as by performing high pass filtering, creates a ringing effect around edges, making the edges look jagged. The processes also highlight artifacts from the compression process, especially in flat regions such as a human face or a wall. The reason for this highlighting is that the sharpening process cannot differentiate between real object edges and those of compression artifacts. These sharpening processes cancel the effects of smoothing of compression artifacts. The smoothing of compression artifacts and the sharpening of real image edges using existing sharpening processes are inherently contradictory since any smoothed artifacts will reappear upon sharpening.
There is another disadvantage associated with existing sharpening processes. These sharpening processes are usually computationally intensive. Most existing processes include finding a low-pass value of an image data. These processes then negate this low-pass value to get a high-pass residue or data. These processes next enhance the high-pass data before adding the high-pass data back to the original image data. Such processes require two passes over the image data, a first pass to obtain the high-pass data and a second pass to enhance the original image. Most consumer printers would not have the memory or processing capability to support such two-pass sharpening processes.
The foregoing therefore creates the need for a single-pass sharpening process for enhancing a JPEG decompressed image, the single-pass sharpening process is less computationally demanding than a two-pass process. This sharpening process should preferably also sharpen objects that resemble real objects and avoid sharpening of compression artifacts. It is also an object for the process to be a pipelined process in which sharpening can proceed with a partially available image data.
The present invention provides a process for enhancing image data defined by a two-dimensional array of pixel values. The process includes selecting a first pixel value to be enhanced and a group of pixel values surrounding the first pixel value from the array of pixel. The first pixel value is changed to an enhanced second pixel value by first taking differences in pixel values between each pixel value in the selected group and the first pixel value. These differences in values or value differences are compared with a threshold value. Those value differences which exceed the threshold value are then used to determine the enhanced second pixel value.